Optimal. Leaf size=181 \[ -\frac {2 b^2 e n^2 r}{x}-\frac {2 b e n (a+b n) r}{x}-\frac {e \left (a^2+2 a b n+2 b^2 n^2\right ) r}{x}-\frac {2 b^2 e n r \log \left (c x^n\right )}{x}-\frac {2 b e (a+b n) r \log \left (c x^n\right )}{x}-\frac {b^2 e r \log ^2\left (c x^n\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 181, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2342, 2341,
2413, 14} \begin {gather*} -\frac {e r \left (a^2+2 a b n+2 b^2 n^2\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b e r (a+b n) \log \left (c x^n\right )}{x}-\frac {2 b e n r (a+b n)}{x}-\frac {b^2 e r \log ^2\left (c x^n\right )}{x}-\frac {2 b^2 e n r \log \left (c x^n\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b^2 e n^2 r}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2341
Rule 2342
Rule 2413
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx &=-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}-(e r) \int \frac {-a^2 \left (1+\frac {2 b n (a+b n)}{a^2}\right )-2 b (a+b n) \log \left (c x^n\right )-b^2 \log ^2\left (c x^n\right )}{x^2} \, dx\\ &=-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}-(e r) \int \left (\frac {-a^2-2 a b n-2 b^2 n^2}{x^2}-\frac {2 b (a+b n) \log \left (c x^n\right )}{x^2}-\frac {b^2 \log ^2\left (c x^n\right )}{x^2}\right ) \, dx\\ &=-\frac {e \left (a^2+2 a b n+2 b^2 n^2\right ) r}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}+\left (b^2 e r\right ) \int \frac {\log ^2\left (c x^n\right )}{x^2} \, dx+(2 b e (a+b n) r) \int \frac {\log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac {2 b e n (a+b n) r}{x}-\frac {e \left (a^2+2 a b n+2 b^2 n^2\right ) r}{x}-\frac {2 b e (a+b n) r \log \left (c x^n\right )}{x}-\frac {b^2 e r \log ^2\left (c x^n\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}+\left (2 b^2 e n r\right ) \int \frac {\log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac {2 b^2 e n^2 r}{x}-\frac {2 b e n (a+b n) r}{x}-\frac {e \left (a^2+2 a b n+2 b^2 n^2\right ) r}{x}-\frac {2 b^2 e n r \log \left (c x^n\right )}{x}-\frac {2 b e (a+b n) r \log \left (c x^n\right )}{x}-\frac {b^2 e r \log ^2\left (c x^n\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 138, normalized size = 0.76 \begin {gather*} -\frac {a^2 d+2 a b d n+2 b^2 d n^2+a^2 e r+4 a b e n r+6 b^2 e n^2 r+e \left (a^2+2 a b n+2 b^2 n^2\right ) \log \left (f x^r\right )+b^2 \log ^2\left (c x^n\right ) \left (d+e r+e \log \left (f x^r\right )\right )+2 b \log \left (c x^n\right ) \left (a (d+e r)+b n (d+2 e r)+e (a+b n) \log \left (f x^r\right )\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.47, size = 8407, normalized size = 46.45
method | result | size |
risch | \(\text {Expression too large to display}\) | \(8407\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 227, normalized size = 1.25 \begin {gather*} -b^{2} {\left (\frac {r}{x} + \frac {\log \left (f x^{r}\right )}{x}\right )} e \log \left (c x^{n}\right )^{2} - 2 \, a b {\left (\frac {r}{x} + \frac {\log \left (f x^{r}\right )}{x}\right )} e \log \left (c x^{n}\right ) - 2 \, b^{2} d {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} - 2 \, {\left (\frac {{\left (r \log \left (x\right ) + 3 \, r + \log \left (f\right )\right )} n^{2}}{x} + \frac {n {\left (2 \, r + \log \left (f\right ) + \log \left (x^{r}\right )\right )} \log \left (c x^{n}\right )}{x}\right )} b^{2} e - \frac {2 \, a b n {\left (2 \, r + \log \left (f\right ) + \log \left (x^{r}\right )\right )} e}{x} - \frac {b^{2} d \log \left (c x^{n}\right )^{2}}{x} - \frac {2 \, a b d n}{x} - \frac {a^{2} r e}{x} - \frac {2 \, a b d \log \left (c x^{n}\right )}{x} - \frac {a^{2} e \log \left (f x^{r}\right )}{x} - \frac {a^{2} d}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 316, normalized size = 1.75 \begin {gather*} -\frac {b^{2} n^{2} r e \log \left (x\right )^{3} + 2 \, b^{2} d n^{2} + 2 \, a b d n + a^{2} d + {\left (6 \, b^{2} n^{2} + 4 \, a b n + a^{2}\right )} r e + {\left (b^{2} r e + b^{2} d\right )} \log \left (c\right )^{2} + {\left (2 \, b^{2} n r e \log \left (c\right ) + b^{2} n^{2} e \log \left (f\right ) + b^{2} d n^{2} + {\left (3 \, b^{2} n^{2} + 2 \, a b n\right )} r e\right )} \log \left (x\right )^{2} + 2 \, {\left (b^{2} d n + a b d + {\left (2 \, b^{2} n + a b\right )} r e\right )} \log \left (c\right ) + {\left (b^{2} e \log \left (c\right )^{2} + 2 \, {\left (b^{2} n + a b\right )} e \log \left (c\right ) + {\left (2 \, b^{2} n^{2} + 2 \, a b n + a^{2}\right )} e\right )} \log \left (f\right ) + {\left (b^{2} r e \log \left (c\right )^{2} + 2 \, b^{2} d n^{2} + 2 \, a b d n + {\left (6 \, b^{2} n^{2} + 4 \, a b n + a^{2}\right )} r e + 2 \, {\left (b^{2} d n + {\left (2 \, b^{2} n + a b\right )} r e\right )} \log \left (c\right ) + 2 \, {\left (b^{2} n e \log \left (c\right ) + {\left (b^{2} n^{2} + a b n\right )} e\right )} \log \left (f\right )\right )} \log \left (x\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.21, size = 280, normalized size = 1.55 \begin {gather*} - \frac {a^{2} d}{x} - \frac {a^{2} e r}{x} - \frac {a^{2} e \log {\left (f x^{r} \right )}}{x} - \frac {2 a b d n}{x} - \frac {2 a b d \log {\left (c x^{n} \right )}}{x} - \frac {4 a b e n r}{x} - \frac {2 a b e n \log {\left (f x^{r} \right )}}{x} - \frac {2 a b e r \log {\left (c x^{n} \right )}}{x} - \frac {2 a b e \log {\left (c x^{n} \right )} \log {\left (f x^{r} \right )}}{x} - \frac {2 b^{2} d n^{2}}{x} - \frac {2 b^{2} d n \log {\left (c x^{n} \right )}}{x} - \frac {b^{2} d \log {\left (c x^{n} \right )}^{2}}{x} - \frac {6 b^{2} e n^{2} r}{x} - \frac {2 b^{2} e n^{2} \log {\left (f x^{r} \right )}}{x} - \frac {4 b^{2} e n r \log {\left (c x^{n} \right )}}{x} - \frac {2 b^{2} e n \log {\left (c x^{n} \right )} \log {\left (f x^{r} \right )}}{x} - \frac {b^{2} e r \log {\left (c x^{n} \right )}^{2}}{x} - \frac {b^{2} e \log {\left (c x^{n} \right )}^{2} \log {\left (f x^{r} \right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 392 vs.
\(2 (190) = 380\).
time = 6.80, size = 392, normalized size = 2.17 \begin {gather*} -\frac {b^{2} n^{2} r e \log \left (x\right )^{3} + 3 \, b^{2} n^{2} r e \log \left (x\right )^{2} + 2 \, b^{2} n r e \log \left (c\right ) \log \left (x\right )^{2} + b^{2} n^{2} e \log \left (f\right ) \log \left (x\right )^{2} + 6 \, b^{2} n^{2} r e \log \left (x\right ) + 4 \, b^{2} n r e \log \left (c\right ) \log \left (x\right ) + b^{2} r e \log \left (c\right )^{2} \log \left (x\right ) + 2 \, b^{2} n^{2} e \log \left (f\right ) \log \left (x\right ) + 2 \, b^{2} n e \log \left (c\right ) \log \left (f\right ) \log \left (x\right ) + b^{2} d n^{2} \log \left (x\right )^{2} + 2 \, a b n r e \log \left (x\right )^{2} + 6 \, b^{2} n^{2} r e + 4 \, b^{2} n r e \log \left (c\right ) + b^{2} r e \log \left (c\right )^{2} + 2 \, b^{2} n^{2} e \log \left (f\right ) + 2 \, b^{2} n e \log \left (c\right ) \log \left (f\right ) + b^{2} e \log \left (c\right )^{2} \log \left (f\right ) + 2 \, b^{2} d n^{2} \log \left (x\right ) + 4 \, a b n r e \log \left (x\right ) + 2 \, b^{2} d n \log \left (c\right ) \log \left (x\right ) + 2 \, a b r e \log \left (c\right ) \log \left (x\right ) + 2 \, a b n e \log \left (f\right ) \log \left (x\right ) + 2 \, b^{2} d n^{2} + 4 \, a b n r e + 2 \, b^{2} d n \log \left (c\right ) + 2 \, a b r e \log \left (c\right ) + b^{2} d \log \left (c\right )^{2} + 2 \, a b n e \log \left (f\right ) + 2 \, a b e \log \left (c\right ) \log \left (f\right ) + 2 \, a b d n \log \left (x\right ) + a^{2} r e \log \left (x\right ) + 2 \, a b d n + a^{2} r e + 2 \, a b d \log \left (c\right ) + a^{2} e \log \left (f\right ) + a^{2} d}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.01, size = 181, normalized size = 1.00 \begin {gather*} -\ln \left (f\,x^r\right )\,\left (\ln \left (c\,x^n\right )\,\left (\frac {2\,a\,b\,e}{x}+\frac {2\,b^2\,e\,n}{x}\right )+\frac {a^2\,e}{x}+\frac {2\,b^2\,e\,n^2}{x}+\frac {b^2\,e\,{\ln \left (c\,x^n\right )}^2}{x}+\frac {2\,a\,b\,e\,n}{x}\right )-\frac {a^2\,d+2\,b^2\,d\,n^2+a^2\,e\,r+6\,b^2\,e\,n^2\,r+2\,a\,b\,d\,n+4\,a\,b\,e\,n\,r}{x}-\frac {2\,b\,\ln \left (c\,x^n\right )\,\left (a\,d+b\,d\,n+a\,e\,r+2\,b\,e\,n\,r\right )}{x}-\frac {b^2\,{\ln \left (c\,x^n\right )}^2\,\left (d+e\,r\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________